﻿@section header
{<!-- Bellows Styles -->
    <link href="~/Themes/Common/assert/plugins/flexSlider-2.2.2/flexslider.css?version=1.2.6" rel="stylesheet" />
    <link href="~/Themes/RongJi/Style/plugins/zoomer/jquery.fs.zoomer.css?version=1.2.6" rel="stylesheet" />
    <link href="~/Themes/RongJi/Style/base/css/details.css?version=1.2.6" rel="stylesheet" />
    <style>
        .innerwrapper, .pageHeaderMini {
            display: none;
        }

        #tabs-1 img {
            width: 100%;
            height: auto;
        }
    </style>
}
<div>
    <div class="pruduct_summary" id="pruduct_summary">
        <div class="flexslider">
            <ul class="slides">
            </ul>
        </div>
        <div class="summary">
        </div>
        <div class="specs" id="groupPropertyPanel">
        </div>
        <div class="dragToShow" id="dragToShow">
            <input type="hidden" value="@Model.CardId" id="cardId">
            <input type="hidden" value="@Model.Signature" id="signature">
            <input type="hidden" value="@Model.TimeStamp" id="timeStamp">
            <button class="btn btn-success" id="batchAddCard"><i class="glyphicon glyphicon-chevron-up"></i>领取优惠券</button>
        </div>
    </div>
</div>
<script>
    var readyFunc = function onBridgeReady() {
        document.querySelector('#batchAddCard').addEventListener('click',
        function (e) {
            WeixinJSBridge.invoke('batchAddCard',
            {
                "card_list": [
                {
                    "card_id": $("#cardId").val(),
                    "card_ext": "{\"timestamp\":\"" + $("#timeStamp").val() + "\",\"signature\":\"" + $("#signature").val() + "\"}"
                }]
            },
            function (res) { });
        });
    }

    if (typeof WeixinJSBridge === "undefined") {
        document.addEventListener('WeixinJSBridgeReady', readyFunc, false);
    }
    else {
        readyFunc();
    }
</script>

